<?php session_start(); if($_SESSION['properlogin'] != 1){ header("Location:error.html"); }?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Information (1/4)</title>
<script type="text/javascript" src="validateInformation.js" ></script>
<?php
require_once 'PIView.php';
if(isset($_POST['Next']))
{
	
	$snum=$_POST['studNum1'].$_POST['studNum2'];
	$fnme=$_POST['firstName'];
	$lnme=$_POST['lastName'];
	$mnme=$_POST['middleName'];
	$bday=$_POST['bdDate'].$_POST['bdMonth'].$_POST['bdYear'];
	$gendr=$_POST['gender'];
	$college=$_POST['college'];
	$crs=$_POST['course'];
	$cstatus=$_POST['civilStatus'];
	$lschool=$_POST['lastSchoolAttended'];
	$lschtype=$_POST['hSchool'];
	$religion=$_POST['religion'];
	$class=$_POST['classification'];
	$stfap=$_POST['stfapBracket'];
	$schol=$_POST['scholarships'];
	$stipe=$_POST['allowance'];
	$cp=$_POST['cellPhone'];
	$email=$_POST['email'];
	$hobbies=$_POST['hobbies'];
	$honors=$_POST['honors'];
	$talents=$_POST['talents'];
	$ailments=$_POST['ailments'];
	$meds=$_POST['medications'];
	$addres=$_POST['homeAddress'];
	$_SESSION['snum']=$snum;
	$_SESSION['fnme']=$fnme;
	$_SESSION['lnme']=$lnme;
	$_SESSION['mnme']=$mnme;
	$_SESSION['bday']=$bday;
	$_SESSION['gendr']=$gendr;
	$_SESSION['college']=$college;
	$_SESSION['course']=$crs;
	$_SESSION['cstatus']=$cstatus;
	$_SESSION['lschool']=$lschool;
	$_SESSION['lschtype']=$lschtype;
	$_SESSION['religion']=$religion;
	$_SESSION['class']=$class;
	$_SESSION['stfap']=$stfap;
	$_SESSION['schol']=$schol;
	$_SESSION['stipe']=$stipe;
	$_SESSION['cp']=$cp;
	$_SESSION['email']=$email;
	$_SESSION['hobbies']=$hobbies;
	$_SESSION['honors']=$honors;
	$_SESSION['talents']=$talents;
	$_SESSION['ailments']=$ailments;
	$_SESSION['meds']=$meds;
	$_SESSION['addres']=$addres;
	
	$f = PIView::checkDuplicate($snum);
	if($f){
		echo'<script>alert("Student number already exists.")</script>';
	}else{
		header("Location:form2.php");
	}
	
}
?>


<link href="style.css" rel="stylesheet" type="text/css" />
</head>

<body>
<table width="100%" border="0" cellpadding="1">
 
  <tr>
    <td>&nbsp;</td>
    <td class="subBanner"><strong> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Resident's Basic Information Form</strong></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>
    <form id="form1" name="form1" method="post" action="" onsubmit="return validateInformation(this)">
      <table width="100%" border="0" cellpadding="1">
        <tr>
          <td>Student Number</td>
          <td><strong>
          <input name="studNum1" type="text" id="studNum1" size="3" />
-
<input name="studNum2" type="text" id="studNum2" size="7" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </strong>&nbsp;</td>
          <td id="snum" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td width="37%"><strong>Last Name</strong></td>
          <td width="34%"><input name="lastName" type="text" id="lastName" size="40" />            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td width="29%" id="lname" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>First Name</td>
          <td><input name="firstName" type="text" id="firstName" size="40" />            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td id="fname" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>Middle Name</td>
          <td><input name="middleName" type="text" id="firstName2" size="40" />            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td id="mname" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>Sex</td>
          <td><input type="radio" name="gender" value="male" />
Male
  <input type="radio" name="gender" value="female" />

Female&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td id="gnder" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>Civil Status</td>
          <td><input type="radio" name="civilStatus" id="civilStatus" value="single" />
            <label for="civilStatus"></label>
Single
<input type="radio" name="civilStatus" id="civilStatus2" value="married" />
Married
<input type="radio" name="civilStatus" id="civilStatus3" value="widowed" />
Widowed&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td id="cvilStatus" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>Date of Birth</td>
          <td><select name="bdMonth" id="bdMonth">
           <option selected="selected" value="JAN">January</option>
              <option value="FEB">February</option>
              <option value="MAR">March</option>
              <option value="APR">April</option>
              <option value="MAY">May</option>
              <option value="JUN">June</option>
              <option value="JUL">July</option>
              <option value="AUG">August</option>
              <option value="SEP">September</option>
              <option value="OCT">October</option>
              <option value="NOV">November</option>
              <option value="DEC">December</option>
          </select>
&nbsp;
<label for="bdDay"></label>
<label for="bdDate"></label>

<select name="bdDate" id="bdDate">
           <option selected="selected" value="01">1</option>
              <option value="02">2</option>
              <option value="03">3</option>
              <option value="04">4</option>
              <option value="05">5</option>
              <option value="06">6</option>
              <option value="07">7</option>
              <option value="08">8</option>
              <option value="09">9</option>
              <option value="10">10</option>
			  <option value="11">11</option>
              <option value="12">12</option>
              <option value="13">13</option>
              <option value="14">14</option>
              <option value="15">15</option>
              <option value="16">16</option>
              <option value="17">17</option>
              <option value="18">18</option>
              <option value="19">19</option>
			  <option value="20">20</option>
              <option value="21">21</option>
              <option value="22">22</option>
              <option value="23">23</option>
              <option value="24">24</option>
              <option value="25">25</option>
              <option value="26">26</option>
              <option value="27">27</option>
              <option value="28">28</option>
			  <option value="29">29</option>
              <option value="30">30</option>
              <option value="31">31</option>

          </select>


&nbsp;
<label for="bdYear"></label>
<select name="bdYear" id="bdYear">

  <option value="1990">1990</option>
  <option value="1991">1991</option>
  <option value="1992">1992</option>
  <option value="1993">1993</option>
  <option value="1994">1994</option>
  <option value="1995">1995</option>
  <option value="1996">1996</option>
  <option value="1997">1997</option>
  <option value="1998">1998</option>
  <option value="1999">1999</option>
  <option value="2000">2000</option>
  <option value="2001">2001</option>
  <option value="2002">2002</option>
  <option value="2003">2003</option>
  <option value="2004">2004</option>
  <option value="2005">2005</option>
  <option value="2006">2006</option>
  <option value="2007">2007</option>
  <option value="2008">2008</option>
  <option value="2009">2009</option>
  <option value="2010">2010</option>
  <option value="2011">2011</option>
</select>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td id="bday" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>College</td>
          <td><select name="college" id="college" onchange="setOptions(document.form1.college.options[document.form1.college.selectedIndex].value, 1);">
								<option value="">Select College</option>
								<option value="Agriculture" name="CA">Agriculture</option>
								<option value="Arts and Sciences" name="CAS">Arts and Sciences</option>
								<option value="Economics and Management" name="CEM">Economics and Management</option>
                                <option value="Engineering and Agro Industrial Technology" name="CEAT">Engineering and Agro Industrial Technology</option>			
								<option value="Development Communication" name="CDC">Development Communication</option>
								<option value="Human Ecology" name="CHE">Human Ecology</option>
								<option value="Forestry and Natural Resources" name="CFNR">Forestry and Natural Resources</option>
								<option value="Veterinary Medicine" name="CVM">Veterinary Medicine</option>
								
							</select>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td id="curse2" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>Course</td>
          <td><select name="course" id="course">
				<option value="">Select Course</option>
          </select>	
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td id="curse" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>Religion</td>
          <td><input name="religion" type="text" id="religion" size="40" />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td id="rligion" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>Home Address</td>
          <td><input name="homeAddress" type="text" id="homeAddress" size="40" />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td id="hmeAddress" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>Last School Attended</td>
          <td><input name="lastSchoolAttended" type="text" id="lastSchoolAttended" size="40" />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td id="lstSchoolAttended" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>Last School Type</td>
          <td><input type="radio" name="hSchool" id="hSchool2" value="public" />
Public
  <input type="radio" name="hSchool" id="hSchool2" value="private" />
Private
            &nbsp;
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td id="htype" class="error" >&nbsp;</td>
        </tr>
        <tr>
          <td>Classification</td>
          <td><input name="classification" type="text" id="classification" size="40" />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td id="clssification" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>STFAP Bracket</td>
          <td><strong>&nbsp;</strong>
            <input type="radio" name="stfapBracket" value="a" />
A
<label for="stfapBracket"></label>
<input type="radio" name="stfapBracket" id="stfapBracket2" value="b" />
B
<input type="radio" name="stfapBracket" id="stfapBracket3" value="c" />
C
<input type="radio" name="stfapBracket" id="stfapBracket4" value="d" />
D
<input type="radio" name="stfapBracket" id="stfapBracket5" value="e1" />
E1
<input type="radio" name="stfapBracket" id="stfapBracket6" value="e2" />
E2
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </td>
          <td id="stfap" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>Scholarships</td>
          <td><input name="scholarships" type="text" id="scholarships" size="40" />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td id="schlarships" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>Allowance</td>
          <td><input name="allowance" type="text" id="allowance" size="40" />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td id="allwance" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>Mobile Number</td>
          <td><input name="cellPhone" type="text" id="cellPhone" size="40" />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td id="cp" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>E-mail Address</td>
          <td><input name="email" type="text" id="email" size="40" />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td id="emailadd" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>Hobbies</td>
          <td><strong>
            <input name="hobbies" type="text" id="fatherOccupation" size="40" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;          </strong></td>
          <td >&nbsp;</td>
        </tr>
        <tr>
          <td>Honors</td>
          <td><strong>
            <input name="honors" type="text" id="fatherIncome" size="40" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;          </strong></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>Talents</td>
          <td><strong>
            <input name="talents" type="text" id="fatherEmployer" size="040" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;          </strong></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>Ailments</td>
          <td><strong>
            <input name="ailments" type="text" id="ailments" size="040" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;          </strong></td>
          <td id="ilments" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>Medications</td>
          <td><strong>
            <input name="medications" type="text" id="medications" size="40" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;          </strong></td>
          <td id="meds" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td><input type="submit" name="Next" id="Next" value="Next" /></td>
          <td>&nbsp;</td>
        </tr>
        </table>
    </form></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
</body>
</html>